package com.flyco.modules.oms.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.flyco.modules.oms.entity.OmsOrderInvoice;
import com.flyco.modules.oms.mapper.OmsOrderInvoiceMapper;
import com.flyco.modules.oms.service.IOmsOrderInvoiceService;
import org.springframework.stereotype.Service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @Description: 订单发票
 * @Author: flyco
 * @Date:   2019-12-10
 * @Version: V1.0
 */
@Service
public class OmsOrderInvoiceServiceImpl extends ServiceImpl<OmsOrderInvoiceMapper, OmsOrderInvoice> implements IOmsOrderInvoiceService {

	@Override
	public List<OmsOrderInvoice> selectByMainId(String mainId) {
		LambdaQueryWrapper<OmsOrderInvoice> query = new LambdaQueryWrapper<>();
		query.eq(OmsOrderInvoice::getOrderId, mainId);
		query.orderByDesc(OmsOrderInvoice::getCreateTime);
		return this.list(query);
	}
}
